class CreateLogFirmModifyHistories < ActiveRecord::Migration[5.1]
  def change
    create_table :log_firm_modify_histories do |t|
      t.integer :firm_id, comment: '对应公司'
      t.string :column_name, comment: '修改字段'
      t.string :old_str, comment: '原内容'
      t.string :new_str, comment: '新内容'
      t.integer :created_by, comment: '修改人'

      t.timestamps
    end

    add_index :log_firm_modify_histories, :firm_id
    add_index :log_firm_modify_histories, :column_name
    add_index :log_firm_modify_histories, :created_by
  end
end
